<?php

include_once "xAP-functions/webincludes.php";
echo webpageheader();

$sql="select SourceID,Alias,Active from xAP_Pictures_Source order by Alias";
$results=dbquery($sql);

//display
echo "<table width=100% cellspacing=0 cellpadding=0>
<TR><TD class='boldtext'></td><TD class='boldtext' colspan=3>Picture Sources</td></tr>
<TR>
<TD class='normalsmalltext'>Active</TD>

<TD class='normalsmalltext'>Source</TD>
</TR>
";
foreach($results as $row){
	echo "<tr>
	<TD class='normaltext'>
	<a href='config_setup_active.php?id=".$row["SourceID"]."&state=".$row["Active"]."'>
	<img src='".LayoutOnOffIcon($row["Active"])."'></a></td>
	
	<TD class='normaltext' width=100%><a href='config_setup_edit.php?id=".$row["SourceID"]."&page=".$page."'>".$row["Alias"]."</a></td>
	<TD class='normaltext'>
	<a href='config_setup_edit.php?id=".$row["SourceID"]."&page=".$page."'>Edit</a>
	</td>
	</tr>";
	echo "<TR bgcolor='#dddddd'><td colspan=5 height=1></td></tr>";
}


echo "
<TR><TD class='normaltext' colspan=4>
<a href='config_setup_edit.php?id=0'>Add New</a></td></tr>
</table>";



echo webpagefooter();
?>